package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.apache.struts2.json.annotations.JSON;

/**
*
* @author db
*/
@Entity
@Table(name = "news_systempopumsg")
//@NamedQueries({@NamedQuery(name = "NewsSystemPopumsg.findAll", query = "SELECT n FROM NewsSystemPopumsg n"), @NamedQuery(name = "NewsSystemPopumsg.findByMsgid", query = "SELECT n FROM NewsSystemPopumsg n WHERE n.msgid = :msgid")})
public class NewsSystemPopumsg implements Serializable{
	private static final long serialVersionUID = 1L;
    @Id   
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Basic(optional = false)
    @Column(name = "msgid")
    private Integer msgid;
    @Column(name = "msgmoretext")
    private String msgmoretext;
    @Column(name = "msgcontentid")
    private String msgcontentid;
    @Column(name = "msgcontenttype")
    private Integer msgcontenttype;
    @Column(name = "msgurl")
    private String msgurl;
    @Column(name = "msgaction")
    private Integer msgaction;
    @Column(name = "msgsms")
    private String msgsms;
    @Column(name = "msgpicture")
    private String msgpicture;
    @Column(name = "flag")
    private Integer flag;
    @Column(name = "msgcreater")
    private String msgcreater;
    @Column(name = "msgcreatetime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date msgcreatetime;
    @Column(name = "msginvalidtime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date msginvalidtime;	//新增字段：失效时间
    @Column(name = "cid")
    private Integer cid;
    @Column(name = "tlabel")
    private String tlabel;
    
	public Integer getMsgid() {
		return msgid;
	}
	public void setMsgid(Integer msgid) {
		this.msgid = msgid;
	}
	public String getMsgmoretext() {
		return msgmoretext;
	}
	public void setMsgmoretext(String msgmoretext) {
		this.msgmoretext = msgmoretext;
	}
	public String getMsgcontentid() {
		return msgcontentid;
	}
	public void setMsgcontentid(String msgcontentid) {
		this.msgcontentid = msgcontentid;
	}
	public Integer getMsgcontenttype() {
		return msgcontenttype;
	}
	public void setMsgcontenttype(Integer msgcontenttype) {
		this.msgcontenttype = msgcontenttype;
	}
	public String getMsgurl() {
		return msgurl;
	}
	public void setMsgurl(String msgurl) {
		this.msgurl = msgurl;
	}
	public Integer getMsgaction() {
		return msgaction;
	}
	public void setMsgaction(Integer msgaction) {
		this.msgaction = msgaction;
	}
	public String getMsgsms() {
		return msgsms;
	}
	public void setMsgsms(String msgsms) {
		this.msgsms = msgsms;
	}
	public String getMsgpicture() {
		return msgpicture;
	}
	public void setMsgpicture(String msgpicture) {
		this.msgpicture = msgpicture;
	}
	public Integer getFlag() {
		return flag;
	}
	public void setFlag(Integer flag) {
		this.flag = flag;
	}
	public String getMsgcreater() {
		return msgcreater;
	}
	public void setMsgcreater(String msgcreater) {
		this.msgcreater = msgcreater;
	}
	@JSON(format="yyyy-MM-dd HH:mm:ss")
	public Date getMsgcreatetime() {
		return msgcreatetime;
	}
	public void setMsgcreatetime(Date msgcreatetime) {
		this.msgcreatetime = msgcreatetime;
	}
	public Integer getCid() {
		return cid;
	}
	public void setCid(Integer cid) {
		this.cid = cid;
	}
	public String getTlabel() {
		return tlabel;
	}
	public void setTlabel(String tlabel) {
		this.tlabel = tlabel;
	}
	
	
	@Override
    public int hashCode() {
        int hash = 0;
        hash += (msgid != null ? msgid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NewsSystemPopumsg)) {
            return false;
        }
        NewsSystemPopumsg other = (NewsSystemPopumsg) object;
        if ((this.msgid == null && other.msgid != null) || (this.msgid != null && !this.msgid.equals(other.msgid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.NewsSystemPopumsg[msgid=" + msgid + "]";
    }
    
	@JSON(format="yyyy-MM-dd HH:mm:ss")
	public Date getMsginvalidtime() {
		return msginvalidtime;
	}
	public void setMsginvalidtime(Date msginvalidtime) {
		this.msginvalidtime = msginvalidtime;
	}
}
